/*
 * topcoder SRM 191 Div 2 Prob 1
 */

import java.util.*;
import java.util.regex.*;
import java.text.*;
import java.math.*;


public class BettingMoney
{
    public int moneyMade(int[] amounts, int[] centsPerDollar, int finalResult)
    {
	int sum = 0;
	for (int amount:amounts)
	    sum += amount;
	sum -= amounts[finalResult];
	sum *= 100;
	sum -= amounts[finalResult] * centsPerDollar[finalResult];
	return sum;
    }
    

}
//Powered by KawigiEdit 2.1.4 (beta) modified by pivanof!